const date = {};
/**
 * @description 获取前几天时间
 * @param {String} num 天数 type 类型
 * 示例：getTimeByNum(1,'days')
 */
date.getTimeByNum = function getTimeByNum(num, type) {
  return moment().subtract(num, type).format("YYYY-MM-DD HH:mm:ss");
};

export default date;
